import { Controller, Get, Post, Body, Patch, Param, Delete } from '@nestjs/common';
import { SysDepartService } from './sys_depart.service';
import { CreateSysDepartDto } from './dto/create-sys_depart.dto';
import { UpdateSysDepartDto } from './dto/update-sys_depart.dto';

@Controller('sys-depart')
export class SysDepartController {
  constructor(private readonly sysDepartService: SysDepartService) {}

  @Post()
  create(@Body() createSysDepartDto: CreateSysDepartDto) {
    return this.sysDepartService.create(createSysDepartDto);
  }

  @Get()
  findAll() {
    return this.sysDepartService.findAll();
  }

  @Get(':id')
  findOne(@Param('id') id: string) {
    return this.sysDepartService.findOne(id);
  }

  @Patch(':id')
  update(@Param('id') id: string, @Body() updateSysDepartDto: UpdateSysDepartDto) {
    return this.sysDepartService.update(id, updateSysDepartDto);
  }

  @Delete(':id')
  remove(@Param('id') id: string) {
    return this.sysDepartService.remove(id);
  }
}
